using System;
using System.Collections.Generic;
using EP.Base.BaseService.Manager.Model.Entity;

namespace EP.Base.BaseService.Manager.Interface.Data
{    
	/// <summary>
    /// IndexDeleteLog 接口
    /// </summary>
     public interface IIndexDeleteLogs
    {

		/// <summary>
		/// 添加IndexDeleteLog
		/// </summary>
		/// <param name="indexdeletelog"></param>
		/// <returns></returns>
		int Add(IndexDeleteLog indexdeletelog);

	    /// <summary>
	    /// 添加IndexDeleteLog如果索引存在不做任何操作
	    /// </summary>
	    /// <param name="indexdeletelog"></param>
	    /// <returns></returns>
	    int AddByNoIndex(IndexDeleteLog indexdeletelog);
		/// <summary>
       /// 修改IndexDeleteLog
       /// </summary>
       /// <param name="indexdeletelog"></param>
       /// <returns></returns>
       int Update(IndexDeleteLog indexdeletelog);
		/// <summary>
		/// 根据id获取IndexDeleteLog
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		IndexDeleteLog Get(int id);
		/// <summary>
		/// 根据id删除IndexDeleteLog
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		Int32 Delete(int id);
		/// <summary>
		/// 根据ids删除IndexDeleteLog多条记录
		/// </summary>
		/// <param name="ids"></param>
		/// <returns></returns>
		Int32 Deletes(int[] ids);
		/// <summary>
       /// 获取IndexDeleteLog分页列表
       /// </summary>
       /// <param name="pageIndex">页码</param>
       /// <param name="pageSize">每页显示条数</param>
       /// <param name="beginTime">开始时间</param>
       /// <param name="endTime">结束时间</param>
       /// <param name="recordCount">总记录数</param>
       /// <returns>IndexDeleteLog列表</returns>
       List<IndexDeleteLog> GetPageList(int pageIndex, int pageSize, DateTime? beginTime, DateTime? endTime, out int recordCount);
	  
		/// <summary>
		/// 获取所有IndexDeleteLog
		/// </summary>
		/// <returns></returns>
		List<IndexDeleteLog> GetAll();
        /// <summary>
        /// 根据EsTaskConfigId获取所有IndexDeleteLog
        /// </summary>
        /// <returns></returns>
        List<IndexDeleteLog> GetByIndexConfigId(int indexConfigId, short state);

	    /// <summary>
	    /// 更新状态
	    /// </summary>
	    /// <param name="indexConfigId"></param>
	    /// <param name="oldState"></param>
	    /// <param name="newState"></param>
	    /// <returns></returns>
	    bool UpdateStateByIndexConfigId(int indexConfigId, short oldState,short newState);

	    /// <summary>
	    /// 更新状态
	    /// </summary>
	    /// <param name="id"></param>
	    /// <param name="state"></param>
	    /// <param name="deleteTime"></param>
	    /// <returns></returns>
	    bool UpdateStateAndDeleteTimeById(int id,short state,DateTime deleteTime);
    }
}
